﻿using System;
using System.Web;

namespace ColorWanted.Plugin.Base
{
    /// <summary>
    /// 插件接口
    /// </summary>
    public abstract class PluginBase : Settings, IDisposable
    {
        /// <summary>
        /// 插件名称
        /// </summary>
        public abstract string Name { get; }

        /// <summary>
        /// 插件版本
        /// </summary>
        public abstract Version Version { get; }

        /// <summary>
        /// 插件描述
        /// </summary>
        public abstract string Description { get; }

        /// <summary>
        /// 插件作者
        /// </summary>
        public abstract string Author { get; }

        /// <summary>
        /// 插件网站
        /// </summary>
        public abstract string Url { get; }

        public abstract void Dispose();

        /// <summary>
        /// 加载插件后调用，使用了 abstract 修饰，所以必须实现
        /// </summary>
        public abstract void Load();

        /// <summary>
        /// 打开插件
        /// </summary>
        public abstract void Open();

        public Settings Settings { get; set; }
    }
}
